import Vue from 'vue'

import Vuex from 'vuex'

Vue.use(Vuex)
var store = new Vuex.Store({
  state:{
    getPermission:['admin','edit'],
    UserInfor:{},
    demoValue:{
      Login: null
    }
  },
  getters: {
    getDemoValue: (state)=>{
      state.demoValue.PageNum;
    },
    getOptions: (state)=>{
      return state.Options;
    },
    getPermission: (state)=>{
      return state.getPermission;
    },
    getUserInfor: (state)=>{
      return state.UserInfor;
    }
},
  actions:{
    setdata(state,demoValue){
      
    }
  },
  mutations:{
    setDemoValue(state,demoValue){
        let MNname = demoValue.MN
        state.demoValue[MNname] = demoValue;
        // console.log(state.demoValue[MNname],'qwe');
        
    },
    setUserInfor(state,demoValue){
      state.UserInfor = demoValue;
  }
  },
  actions:{
  }
});
export default store